<template>
  <div class="home-page">
    <div class="page-container">
      <!-- Hero Section -->
      <section class="hero-section">
        <div class="hero-content">
          <h1 class="hero-title">智能医疗数据处理平台</h1>
          <p class="hero-description">
            MediMind提供先进的医疗数据处理解决方案，帮助医疗机构实现病历数据的智能化管理与分析
          </p>
          <div class="hero-actions">
            <el-button type="primary" size="large" @click="navigateTo('/tools/html-extract')">
              病历结构化提取
            </el-button>
            <el-button size="large" @click="navigateTo('/tools/template-process')">
              病历模板处理
            </el-button>
          </div>
        </div>
        <div class="hero-image">
          <img src="../assets/hospital-logo.svg" alt="MediMind" />
        </div>
      </section>

      <!-- Features Section -->
      <section class="features-section">
        <h2 class="section-title">核心功能</h2>
        <el-row :gutter="24">
          <el-col :xs="24" :sm="12" :md="8">
            <div class="feature-card">
              <el-icon size="48" color="#409EFF"><DataAnalysis /></el-icon>
              <h3>病历结构化提取</h3>
              <p>将医院病历HTML内容快速转换为结构化JSON数据，支持文件上传和文本输入两种方式</p>
              <el-button text type="primary" @click="navigateTo('/tools/html-extract')">
                立即使用 <el-icon><ArrowRight /></el-icon>
              </el-button>
            </div>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <div class="feature-card">
              <el-icon size="48" color="#409EFF"><Document /></el-icon>
              <h3>病历模板处理</h3>
              <p>通过智能匹配病历模板，实现病历数据的标准化处理，支持一站式和分步处理流程</p>
              <el-button text type="primary" @click="navigateTo('/tools/template-process')">
                立即使用 <el-icon><ArrowRight /></el-icon>
              </el-button>
            </div>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <div class="feature-card">
              <el-icon size="48" color="#409EFF"><Connection /></el-icon>
              <h3>智能数据分析</h3>
              <p>基于AI的医疗数据分析功能，提供数据可视化和洞察，帮助医疗机构做出更明智的决策</p>
              <el-button text type="primary" disabled>
                即将推出 <el-icon><Timer /></el-icon>
              </el-button>
            </div>
          </el-col>
        </el-row>
      </section>

      <!-- Benefits Section -->
      <section class="benefits-section">
        <h2 class="section-title">使用优势</h2>
        <el-row :gutter="24">
          <el-col :xs="24" :sm="12">
            <div class="benefit-item">
              <el-icon><Checked /></el-icon>
              <div>
                <h4>提高效率</h4>
                <p>减少80%的人工数据录入时间，显著提升医疗数据处理效率</p>
              </div>
            </div>
          </el-col>
          <el-col :xs="24" :sm="12">
            <div class="benefit-item">
              <el-icon><Checked /></el-icon>
              <div>
                <h4>降低错误率</h4>
                <p>AI辅助数据处理，降低人为录入错误，提高数据准确性</p>
              </div>
            </div>
          </el-col>
          <el-col :xs="24" :sm="12">
            <div class="benefit-item">
              <el-icon><Checked /></el-icon>
              <div>
                <h4>标准化数据</h4>
                <p>统一数据格式，便于系统集成和医疗信息互通</p>
              </div>
            </div>
          </el-col>
          <el-col :xs="24" :sm="12">
            <div class="benefit-item">
              <el-icon><Checked /></el-icon>
              <div>
                <h4>易于使用</h4>
                <p>直观的用户界面，无需专业技术知识即可操作</p>
              </div>
            </div>
          </el-col>
        </el-row>
      </section>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { DataAnalysis, Document, Connection, ArrowRight, Timer, Checked } from '@element-plus/icons-vue'

const router = useRouter()

const navigateTo = (path) => {
  router.push(path)
}
</script>

<style scoped>
.home-page {
  padding: 0;
  width: 100%;
}

.page-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 30px;
}

/* Hero Section */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 40px 0 60px;
  gap: 40px;
  width: 100%;
  padding: 0 5%;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-title {
  font-size: 42px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-description {
  font-size: 18px;
  color: #606266;
  margin-bottom: 30px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  max-height: 300px;
}

/* Features Section */
.features-section {
  margin: 60px 0;
  width: 100%;
  padding: 0 5%;
}

.section-title {
  font-size: 32px;
  color: #303133;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: #409EFF;
}

.feature-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 30px;
  height: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 20px;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
  font-size: 20px;
  margin: 20px 0 10px;
  color: #303133;
}

.feature-card p {
  color: #606266;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Benefits Section */
.benefits-section {
  margin: 60px 0;
  padding: 40px 5%;
  background-color: #f5f7fa;
  width: 100%;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.benefit-item .el-icon {
  font-size: 24px;
  color: #67C23A;
  margin-right: 16px;
  margin-top: 3px;
}

.benefit-item h4 {
  font-size: 18px;
  color: #303133;
  margin: 0 0 8px;
}

.benefit-item p {
  margin: 0;
  color: #606266;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 0 20px;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .feature-card {
    margin-bottom: 20px;
  }
  
  .features-section,
  .benefits-section {
    padding: 0 20px;
  }
  
  .benefits-section {
    padding: 40px 20px;
  }
}
</style> 